<template>
	<view class="collection">
		<!-- 我想玩的剧本 -->
		<myScriptDetail :screenplay="screenplay"></myScriptDetail>
	</view>
</template>

<script>
	import myScriptDetail from '@/components/myScriptDetail.vue'
	export default {
		components:{
			myScriptDetail
		},
		data() {
			return {
				screenplay:[]
			}
		},
		methods: {
			// 查询用户收藏剧本
			getCollectScript(){
				// 接口请求
				uni.request({
					url:'http://124.220.177.66:8082/juben/getCollectScript',
					method:'POST',
					data:{
						"openID": "wx999" //openID
					},
					success: (res) => {
						console.log('查询用户收藏剧本',res.data.data);
						this.screenplay = res.data.data
					}
				})
			}
		},
		onLoad(option) {
			console.log('接路由信息openID',option.item);
		},
		created() {
			this.getCollectScript()
		}
	}
</script>

<style lang="less">
	// 底色
	@bColor:#0D141F;
	// 主色
	@mColor:#623685;	
	
	page{
		background-color: @bColor;
	}
</style>
